﻿Public Class SearchBar
    Inherits UserControl
    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox

    Sub New()
        InitializeComponent()
        ResizeRedraw = True
        TextBox1.Location = New Point(TextBox1.Left, 4)
    End Sub

    Private Sub InitializeComponent()
        Me.TextBox1 = New System.Windows.Forms.TextBox()
        Me.SuspendLayout()
        '
        'TextBox1
        '
        Me.TextBox1.Anchor = System.Windows.Forms.AnchorStyles.Left
        Me.TextBox1.Location = New System.Drawing.Point(33, 6)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.Size = New System.Drawing.Size(159, 20)
        Me.TextBox1.TabIndex = 0
        '
        'SearchBar
        '
        Me.Controls.Add(Me.TextBox1)
        Me.Name = "SearchBar"
        Me.Size = New System.Drawing.Size(830, 32)
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

    Private Sub SearchBar_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        e.Graphics.Clear(Color.White)
        Dim R As New Rectangle(0, 0, Height, Height)
        R.Inflate(-6, -6)
        e.Graphics.DrawImage(My.Resources.open.Resize(R.Height, R.Height), R)
        e.Graphics.DrawLine(SystemPens.Control, 4, Bottom - 1, Right - 4, Bottom - 1)
    End Sub

End Class
